package com.example.mapper;

import com.example.pojo.Bill;
import com.example.pojo.BillItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BillMapper {
    @Select("select * from bills where CustomerId = #{CustomerId}")
    public List<Bill> selectBillByCustomerId(@Param("CustomerId") Long CustomerId);

    @Select("select * from rules where vipRuleId = #{vipRuleId}")
    public List<Bill> selectVipRuleByRuleId(@Param("vipRuleId") Long vipRuleId);

    @Select("select * from bill_items where billId = #{billId}")
    public List<BillItem> selectBillItemsByBillId(@Param("billId") Long billId);
}
